4a333449a56163c5c66f0eaf34393e654b7547fa,java/org/apache/catalina/mapper/Mapper.java,Mapper,addWrapper,#String#String#String#String#Wrapper#boolean#boolean#,309

Before Change


                           String path, Wrapper wrapper, boolean jspWildCard,
                           boolean resourceOnly) {
        MappedHost[] hosts = this.hosts;
        int pos = find(hosts, hostName);
        if (pos < 0) {
            return;
        }
        MappedHost host = hosts[pos];
        if (host.name.equals(hostName)) {
            MappedContext[] contexts = host.contextList.contexts;
            int pos2 = find(contexts, contextPath);
            if (pos2 < 0) {
                log.error("No context found: " + contextPath );
                return;
            }
            MappedContext context = contexts[pos2];
            if (context.name.equals(contextPath)) {
                ContextVersion[] contextVersions = context.versions;
                int pos3 = find(contextVersions, version);
                if( pos3<0 ) {
                    log.error("No context version found: " + contextPath + " " +
                            version);
                    return;
                }
                ContextVersion contextVersion = contextVersions[pos3];
                if (contextVersion.name.equals(version)) {
                    addWrapper(contextVersion, path, wrapper, jspWildCard,
                            resourceOnly);
                }

After Change


                           String path, Wrapper wrapper, boolean jspWildCard,
                           boolean resourceOnly) {
        MappedHost[] hosts = this.hosts;
        MappedHost host = exactFind(hosts, hostName);
        if (host == null) {
            return;
        }
        MappedContext[] contexts = host.contextList.contexts;
        MappedContext context = exactFind(contexts, contextPath);
        if (context == null) {
            log.error("No context found: " + contextPath );
            return;
        }
        ContextVersion[] contextVersions = context.versions;
        ContextVersion contextVersion = exactFind(contextVersions, version);
        if (contextVersion == null) {
            log.error("No context version found: " + contextPath + " " +
                    version);
            return;